package com.itheima.a01abstratdemo1;

public abstract class Person2 {
    private String name;
    private int age;

    //作用：当创建子类对象的时候，给属性进行赋值的
    public Person2() {
    }

    public Person2(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public abstract void work();

}
